<html>
<head><meta charset="utf-8"><title>compile error after migration to 2018 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html">compile error after migration to 2018</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="158057308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158057308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158057308">(Feb 11 2019 at 19:29)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0520]: `super_fold_with` specializes an item from a parent `impl`, but that item is not marked `default`
    --&gt; src/librustc/macros.rs:225:17
     |
225  | /                 fn super_fold_with&lt;&#39;gcx: $tcx, F: $crate::ty::fold::TypeFolder&lt;&#39;gcx, $tcx&gt;&gt;(
226  | |                     &amp;self,
227  | |                     _: &amp;mut F
228  | |                 ) -&gt; $ty {
229  | |                     Clone::clone(self)
230  | |                 }
     | |_________________^ cannot specialize default item `super_fold_with`
     |
    ::: src/librustc/mir/mod.rs:2696:1
     |
2696 |   CloneTypeFoldableAndLiftImpls! { ProjectionKind&lt;&#39;tcx&gt;, }
     |   -------------------------------------------------------- in this macro invocation
...
3529 | / impl&lt;&#39;tcx, V, T&gt; TypeFoldable&lt;&#39;tcx&gt; for ProjectionElem&lt;&#39;tcx, V, T&gt;
3530 | | where
3531 | |     V: TypeFoldable&lt;&#39;tcx&gt;,
3532 | |     T: TypeFoldable&lt;&#39;tcx&gt;,
...    |
3551 | |     }
3552 | | }
     | |_- parent `impl` is here
     |
     = note: to specialize, `super_fold_with` in the parent `impl` must be marked `default`
</pre></div>



<a name="158057362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158057362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158057362">(Feb 11 2019 at 19:30)</a>:</h4>
<p>getting this after migration in one of my PRs</p>



<a name="158057395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158057395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158057395">(Feb 11 2019 at 19:30)</a>:</h4>
<p>not sure what needs to be marked as default</p>



<a name="158057589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158057589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158057589">(Feb 11 2019 at 19:32)</a>:</h4>
<p>oh got it :)</p>



<a name="158057612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158057612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158057612">(Feb 11 2019 at 19:32)</a>:</h4>
<div class="codehilite"><pre><span></span>2696 |   CloneTypeFoldableAndLiftImpls! { ProjectionKind&lt;&#39;tcx&gt;, }
     |   -------------------------------------------------------- in this macro invocation
</pre></div>


<p>This should just be removed</p>



<a name="158060012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158060012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158060012">(Feb 11 2019 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> ?</p>



<a name="158060074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158060074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158060074">(Feb 11 2019 at 20:02)</a>:</h4>
<p>I've fixed the issue but was just by adding a default before the appropriate functions</p>



<a name="158062372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158062372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158062372">(Feb 11 2019 at 20:30)</a>:</h4>
<p>That will fix it, but the macro can just be removed, there's no need for specialization here.</p>



<a name="158062554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158062554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158062554">(Feb 11 2019 at 20:33)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>, yeah, I wasn't paying that much attention to the code just fixing something that I didn't write and was failing because of the upgrade</p>



<a name="158062567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/compile%20error%20after%20migration%20to%202018/near/158062567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/compile.20error.20after.20migration.20to.202018.html#158062567">(Feb 11 2019 at 20:33)</a>:</h4>
<p>but yeah, makes sense</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>